<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Insert Table</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
#table {
	border: 1px solid black ;
	margin-right: auto;
	margin-left: auto;
}
.tableCell {
	font: bold 0.9em Verdana, Arial, Sans-Serif;
	text-align: right;
}
</style>
<script language="JavaScript" type="text/javascript">
<!--
function AddTable() {
	var html = '<table border="1" width="100%">\n';
	for (var rows = 0; rows < document.tableForm.rows.value; rows++)
	{
		html += "<tr>\n";
		for (cols = 0; cols < document.tableForm.columns.value; cols++)
		{
			html += "<td>&nbsp;</td>\n";
		}
		html+= "</tr>\n";
	}
// Add line break so that it's possible to continue adding text following the table.
	html += "</table><br>\n";
	window.opener.insertHTML(html);
	window.close();
}
//-->
</script>
</head>

<body>

<form name="tableForm">
<table cellpadding="4" cellspacing="0" border="0" id="table">
	<tr>
		<td align="right" class='tableCell'>Rows:</td>
		<td class='tableCell'><input name="rows" type="text" id="rows" value="2" size="4"></td>
		<td align="left" class='tableCell'>Columns: <input name="columns" type="text" id="columns" value="2" size="4"></td>
	</tr>
	<tr>
		<td colspan="3" align="center" class='tableCell'>
			<input type="button" value="Insert Table" onClick="AddTable();" />
			<input type="button" value="Cancel" onClick="window.close();" />
		</td>
	</tr>
</table>

</form>

</body>
</html>
